import { Menu } from "@/types/system/menu";
import { get, post, put, remove } from "@/utils/request";
/**
 * 查询菜单表格树
 * @returns
 */
export const queryMenuTree = ()=>get<Menu[]>(`/menu/menuTree`);
/**
 * 查询菜单详情
 * @returns
 */
export const queryMenuDetail = (id: string) =>get<Menu>(`/menu/${id}`);
/**
 * 新增菜单
 * @returns
 */
export const addMenu = (data: Menu) =>post(`/menu/add`,data);

/**
 * 修改菜单
 * @returns
 */
export const updateMenu = (data: Menu) =>put(`/menu/update`,data);

/**
 * 删除菜单
 * @param data
 * @returns
 */
export const deleteMenuByIds = (data: IdsType) =>remove(`/menu/remove`,data);
